# -*- coding: utf-8 -*-
# @Author	: starview.guojian.ma
# @Date		: 2022/5/23 15:23
# @Last Modified by:   starview.guojian.ma
# @Last Modified time: 2022/5/23 15:23
# Thanks for your comments!
from typing import Dict, Type, Callable

from src.basedata.application import commands
from src.basedata.application.basedata_handlers import sync_app_department_data, sync_app_person_data, \
    sync_app_medicines_data, sync_app_administration_freq_data, sync_app_route_of_administration_data, \
    sync_disease_code_data, \
    query_app_department_data, query_app_person_data, query_app_disease_code_data, query_app_medicines_data, \
    query_app_route_of_administration_data, query_app_administration_freq_data, update_person_cache

COMMAND_HANDLERS: Dict[Type[commands.Command], Callable] = {
    commands.SyncAppDepartments: sync_app_department_data,
    commands.SyncAppPersons: sync_app_person_data,
    commands.SyncAppMedicines: sync_app_medicines_data,
    commands.SyncAppRouteOfAdministration: sync_app_route_of_administration_data,
    commands.SyncAppAdministrationFreq: sync_app_administration_freq_data,
    commands.SyncAppDiseaseCode: sync_disease_code_data,

    commands.QueryAppDepartments: query_app_department_data,
    commands.QueryAppPersons: query_app_person_data,
    commands.QueryAppMedicines: query_app_medicines_data,
    commands.QueryAppRouteOfAdministration: query_app_route_of_administration_data,
    commands.QueryAppAdministrationFreq: query_app_administration_freq_data,
    commands.QueryAppDiseaseCode: query_app_disease_code_data,

    commands.UpdatePersonCache: update_person_cache

}
